<?php define("pic_prefix", "http://zxjbw.hzjgfy.gov.cn/Manage/Upload/Photo/"); ?>
<link rel="stylesheet" href="resources/weui/dist/style/weui.min.css"/>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<div style="background-color: white;padding-bottom: 50px">
	<div class="weui_cells_title"><?php echo $title ?>
		<a href="javascript:;" class="weui_btn weui_btn_mini weui_btn_primary" style="float: right" id="share">我要曝光</a>
	</div>

	<div class="weui_cells" style="margin-top: 0px;">
		<div class="weui_cell">
			<div class="weui_cell_hd" style="width: 30%"><p>照片</p></div>
			<div class="weui_cell_bd weui_cell_primary">
				<img src="<?php echo pic_prefix.$expose['Pic']?>" alt=""
					 style="width:50% ;margin-right:5px;display:block" id="image"/>
			</div>
		</div>
		<div class="weui_cell ">
			<div class="weui_cell_hd" style="width: 30%"><p>执行编号</p></div>
			<div class="weui_cell_bd weui_cell_primary">
				<p><?php echo $expose['CauseNo']?></p>
			</div>
		</div>
		<div class="weui_cell ">
			<div class="weui_cell_hd" style="width: 30%"><p>案由</p></div>
			<div class="weui_cell_bd weui_cell_primary">
				<p><?php echo $expose['Cause']?></p>
			</div>
		</div>
		<div class="weui_cell ">
			<div class="weui_cell_hd" style="width: 30%"><p>被执行人</p></div>
			<div class="weui_cell_bd weui_cell_primary">
				<p><?php echo $expose['RealName']?></p>
			</div>
		</div>

		<div class="weui_cell ">
			<div class="weui_cell_hd" style="width: 30%"><p>地址</p></div>
			<div class="weui_cell_bd weui_cell_primary">
				<p><?php echo $expose['Address']?></p>
			</div>
		</div>

		<div class="weui_cell ">
			<div class="weui_cell_hd" style="width: 30%"><p>身份证号</p></div>
			<div class="weui_cell_bd weui_cell_primary">
				<p><?php echo $expose['IDNumber']?></p>
			</div>
		</div>

		<div class="weui_cell ">
			<div class="weui_cell_hd" style="width: 30%"><p>联系方式</p></div>
			<div class="weui_cell_bd weui_cell_primary">
				<p><?php echo $expose['Contact']?></p>
			</div>
		</div>

<!--		<div class="weui_cell">-->
<!--			<div class="weui_cell_hd" style="width: 30%"><p>联系方式</p></div>-->
<!--			<div class="weui_cell_bd weui_cell_primary">-->
<!--				<p>057186577777</p>-->
<!--			</div>-->
<!--		</div>-->
		<div class="weui_cell">
			<div class="weui_cell_hd" style="width: 30%"><p>未履行标的</p></div>
			<div class="weui_cell_bd weui_cell_primary">
				<p><?php echo $expose['Amount']?></p>
			</div>
		</div>

		<div class="weui_cell">
			<div class="weui_cell_hd" style="width: 30%"><p>悬赏金额</p></div>
			<div class="weui_cell_bd weui_cell_primary">
				<p>	<?php echo $expose['Reward']?></p>
			</div>
		</div>
		<div class="weui_cell">
			<div class="weui_cell_hd" style="width: 30%"><p>添加时间</p></div>
			<div class="weui_cell_bd weui_cell_primary">
				<p>	<?php echo $expose['OprTime']?></p>
			</div>
		</div>

<!--		<div class="weui_cell">-->
<!--			<div class="weui_cell_hd" style="width: 30%"><p>添加时间</p></div>-->
<!--			<div class="weui_cell_bd">-->
<!--				<p>	2015-10-22 15:13:28</p>-->
<!--			</div>-->
<!--		</div>-->

		<div class="weui_cell">
			<div class="weui_cell_hd" style="width: 30%"><p>案情介绍</p></div>
			<div class="weui_cell_bd weui_cell_primary">
				<p>	<?php echo $expose['Intro']?></p>
			</div>
		</div>
	</div>

	<div class="bd spacing">
		<a href="javascript:;" class="weui_btn weui_btn_primary" id="report">我要举报</a>
	</div>

</div>

<div id="actionSheet_wrap">
	<div class="weui_mask_transition" id="mask"></div>
	<div class="weui_actionsheet" id="weui_actionsheet">
		<div class="weui_actionsheet_menu">
			<div class="weui_actionsheet_cell" id="Timeline">曝光到朋友圈</div>
			<div class="weui_actionsheet_cell" id="AppMessage">提醒朋友</div>
			<div class="weui_actionsheet_cell" id="weibo">曝光到微博</div>
			<div class="weui_actionsheet_cell" id="qq">曝光到qq</div>
		</div>
		<div class="weui_actionsheet_action">
			<div class="weui_actionsheet_cell" id="actionsheet_cancel">取消</div>
		</div>
	</div>
</div>
<img src="resources/image/share.jpg" width="100%" id="share-img" style="display: none"/>
<div id="nonceStr" style="display: none"><?php echo $nonceStr ?></div>
<div id="timestamp" style="display: none"><?php echo $timestamp ?></div>
<div id="APPID" style="display: none"><?php echo $APPID ?></div>
<div id="signature" style="display: none"><?php echo $signature ?></div>
<style>
	body {
		margin: 0;
		padding: 0;
		background: #333;
		overflow: hidden;
	}

	/*ul wrapper*/
	#iSlider-wrapper {
		height: 100%;
		width: 100%;
		overflow: hidden;
		position: absolute;
	}

	#iSlider-wrapper ul {
		list-style: none;
		margin: 0;
		padding: 0;
		height: 100%;
		overflow: hidden;
	}

	#iSlider-wrapper li {
		position: absolute;
		margin: 0;
		padding: 0;
		height: 100%;
		overflow: hidden;
		display: -webkit-box;
		-webkit-box-pack: center;
		-webkit-box-align: center;
		list-style: none;
	}

	#iSlider-wrapper li img {
		max-width: 100%;
		max-height: 100%;
	}
</style>
<script>
		$('#share1').click(function(){
			var mask = $('#mask');
			var weuiActionsheet = $('#weui_actionsheet');
			weuiActionsheet.addClass('weui_actionsheet_toggle');
			mask.show().addClass('weui_fade_toggle').one('click', function () {
				hideActionSheet(weuiActionsheet, mask);
			});
			$('#actionsheet_cancel').one('click', function () {
				hideActionSheet(weuiActionsheet, mask);
			});

			weuiActionsheet.unbind('transitionend').unbind('webkitTransitionEnd');

			function hideActionSheet(weuiActionsheet, mask) {
				weuiActionsheet.removeClass('weui_actionsheet_toggle');
				mask.removeClass('weui_fade_toggle');
				weuiActionsheet.on('transitionend', function () {
					mask.hide();
				}).on('webkitTransitionEnd', function () {
					mask.hide();
				})
			}
		});

		$('#report').click(function(){
			location.href="index.php/ContactOnline/onlinelist";
		});
		$(document).on('click', '#share',function () {
			//$('img.uploadimg').click(function () {
			var base=  $.find('base')[0].href;
			var imgurl=base+$('#share-img').attr('src');
			var urls=[];
			urls.push(imgurl);
			wx.previewImage({
				current: window.location.href, // 当前显示图片的http链接
				urls: urls // 需要预览的图片http链接列表
			});
		});
		var appid=$('#APPID').html();
		var timestamp=$('#timestamp').html();
		var nonceStr=$('#nonceStr').html();
		var signature=$('#signature').html();
		var image=$('#image').attr('src');
		wx.config({
			debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
			appId:appid , // 必填，公众号的唯一标识
			timestamp:timestamp , // 必填，生成签名的时间戳
			nonceStr: nonceStr, // 必填，生成签名的随机串
			signature: signature,// 必填，签名，见附录1
			jsApiList: [
				'onMenuShareAppMessage',
				'onMenuShareQQ',
				'onMenuShareWeibo',
				'onMenuShareTimeline',
				'closeWindow',
				'previewImage'
			] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
		});

	wx.ready(function () {

	});
//		document.querySelector('#share').onclick = function () {
//			var image=$('#image').attr('src');
//			var link=window.location.href;
//			wx.onMenuShareTimeline({
//				title: '和这个老赖打交道要小心',
//				link: link,
//				imgUrl:image,
//				trigger: function (res) {
//					alert('用户点击分享到朋友圈');
//				},
//				success: function (res) {
//					alert('已分享');
//				},
//				cancel: function (res) {
//					alert('已取消');
//				},
//				fail: function (res) {
//					alert(JSON.stringify(res));
//				}
//			});

			//alert('已注册获取“分享到朋友圈”状态事件');

//			var mask = $('#mask');
//			var weuiActionsheet = $('#weui_actionsheet');
//			weuiActionsheet.addClass('weui_actionsheet_toggle');
//			hideActionSheet(weuiActionsheet, mask);
//		};

		function hideActionSheet(weuiActionsheet, mask) {
			weuiActionsheet.removeClass('weui_actionsheet_toggle');
			mask.removeClass('weui_fade_toggle');
			weuiActionsheet.on('transitionend', function () {
				mask.hide();
			}).on('webkitTransitionEnd', function () {
				mask.hide();
			})
		}


</script>

